package edu.sctu.practice.class02.lvchang.test18;

/**
 * Created by Administrator on 2015/10/29.
 */
public class Auto {

    protected int numberOfTire;
    protected String color;
    protected double weight;
    protected int speed;

    public Auto() {

    }

    public Auto(int numberOfTire, String color, double weight, int speed) {
        this.numberOfTire = numberOfTire;
        this.color = color;
        this.weight = weight;
        this.speed = speed;

    }

    public void speedUp() {
        System.out.println("Auto can speed up!");
    }

    public void speedDown() {
        System.out.println("Auto can slow down!");
    }

    public void stop() {
        System.out.println("Auto can stop!");
    }
}

//        建立一个汽车Auto类，包括轮胎个数，汽车颜色，车身重量、速度等成员变量。
//        并通过不同的构造方法创建实例。至少要求：汽车能够加速，减速，停车。
//        再定义一个小汽车类Car，继承Auto，并添加空调、CD等成员变量，覆盖加速，减速的方法、classAuto
